Skip to content

Conversation

@rynoV
Copy link
Contributor

@rynoV rynoV commented Jul 4, 2022

Resolves #11

  • Batch datum fetching
  • Parellelize metadata fetching
  • Need to consider that the blockfrost api rate limiting might be hit
    • If we're just doing a POC with <500 images it should be fine for now
    • Added some basic handling, but if we get to the point of hitting the limitting we should probably refactor to use something like pagination
    • See dabfb1b
  • Remove unnecessary double parsing of blockfrost responses
  • Test: same NFTs shown on page in same order (no regression)
  • Speed up utxo fetching
  • Don't list all NFTs for the individual item pages
  • Implement pagination

Times to load page:

  • Original time to show images: ~55 seconds
  • After batching datum fetching: ~40 seconds
  • After parallelizing metadata fetching + batching datum fetching: ~20 seconds
    • Today (July 7th) utxosAt was faster, only ~5 seconds, page load was ~10 seconds
    • Today (July 8th) utxosAt was back to ~15 seconds

@rynoV rynoV linked an issue Jul 4, 2022 that may be closed by this pull request
@rynoV rynoV marked this pull request as ready for review July 6, 2022 16:43
@rynoV rynoV requested a review from samuelWilliams99 July 6, 2022 16:43
@samuelWilliams99 samuelWilliams99 merged commit 705feb1 into neil/typescript-api Jul 11, 2022
@rynoV rynoV deleted the calum/optimize-list-nft branch July 11, 2022 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor ListNft to be faster

3 participants